From 082edd957e0fc4cd5dd6109664ba4c0b65f643c7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Oct 2020 20:17:50 -0400 Subject: [PATCH] wayland: Don't forget to reapply margins When using the saved size because the compositor told us to, we were forgetting to readd the margins. The visible symptom of this was the window getting smaller every time we went to tiled state and back. --- gdk/wayland/gdksurface-wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index 87eaae752d..72cbc8c2d7 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -1354,6 +1354,11 @@ gdk_wayland_surface_configure_toplevel (GdkSurface *surface) /* Save size for next time we get 0x0 */ _gdk_wayland_surface_save_size (surface); } + else + { + width += impl->margin_left + impl->margin_right; + height += impl->margin_top + impl->margin_bottom; + } gdk_wayland_surface_resize (surface, width, height, impl->scale); } -- 2.30.2